package edu.whu.webgis.controller;

import edu.whu.webgis.entity.Likes;
import edu.whu.webgis.service.ILikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/like")
public class LikeController {
    @Autowired
    ILikeService service;
    @PostMapping("/set")
    public ResponseEntity<Boolean> setLike(@RequestBody Likes like){
        return ResponseEntity.ok(service.setLike(like));
    }
}
